ProxyMongoDeleteOne

 

Delete the first item in MongoDB.

To use MongoDB, you need to have ProxyMongoDB.exe program running. (  https://files.autobase.biz/FileDownLoad/FileDownLoad.aspx?Folder=Proxy )

 

int @ProxyMongoDeleteOne(int connection_id, string collection_name, string filter);

 

Parameters

int connection_id : Connection ID

string collection_name : Collection Name

string filter : Filter Sentence (JSON Text)

 

Return Value

Returns 1 if it succeeds, and 0 if it fails.

 

Example

connection_id = @ProxyMongoOpen("mongodb://192.168.1.149", "test");
if(connection_id == 0)
{
   @Message("Error. connection_id == 0");
   return;
}

string filter,
@sprintf(filter, "{PersonCount:55}");

int retn;

retn = @ProxyMongoDeleteOne(connection_id, "things", filter);
@ProxyMongoClose(connection_id);
if(retn == 0){
   @MessageBox(@GetLastError(), "MongoDeleteOne Error", MB_OK);
   return;
}

 

Description : Example of opening and using the test database of the 192.168.1.149 IP

 

Version Information

Supported Version: 10.3.5 or higher

 

Related Helps

@ProxyMongoClose()

@ProxyMongoDeleteMany()

@ProxyMongoDeleteOne()

@ProxyMongoFill()

@ProxyMongoInsert()

@ProxyMongoOpen()

@ProxyMongoUpdateMany()

@ProxyMongoUpdateOne()